package com.mlog.njyjy.ndop.common.domain;

import com.jfinal.plugin.activerecord.Model;
import com.mlog.njyjy.ndop.common.domain.core.Timeable;
import com.mlog.njyjy.ndop.common.support.Constants;
import com.mlog.njyjy.ndop.share.sql.annotation.Column;
import com.mlog.njyjy.ndop.share.sql.annotation.Id;
import com.mlog.njyjy.ndop.share.sql.annotation.Table;
import com.mlog.njyjy.ndop.share.sql.annotation.TableUnique;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;


/**
 * <p>
 *
 * </p>
 *
 * @author zyz
 * @version v1.0, 2020/8/18
 */
@Data
@Accessors(chain = true)
@Table(prefix = Constants.TBL_PROCESS_PREFIX,
        uniques = {@TableUnique(columns = "nodeId")},
        comment = "消息采集项")
public class MessageCollectItem extends Model<MessageCollectItem> implements Timeable {

    @Id
    private Long id;

    @Column(nullable = false, comment = "节点id")
    private Long nodeId;

    @Column(comment = "消息服务器")
    private String server;

    @Column(nullable = false, comment = "消息主题")
    private String topic;

    @Column(nullable = false, comment = "消息来源系统")
    private String source;

    @Column(comment = "消息来源系统IP")
    private String sourceIp;

    @Column(nullable = false, comment = "业务类型")
    private String type;

    @Column(updatable = false)
    private LocalDateTime createAt;

    private LocalDateTime updateAt;
}
